/**
 * The Universal object Manager main UI object container
 * @author  zulianp@lu.unisi.ch & lemmar@lu.unisi.ch
 * @version 0.1
 */


package ch.unisi.inf.projects.java.uom.gui; 

import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;

public final class UOMMainFrame extends JFrame
{
	/** We are not going to serialize this class atm */
	private static final long serialVersionUID = -1L;
	
	private static UOMMainFrame instance;
	
    private UOMMainFrame()
    {
        super("UOM");
        setToMaxSize();
        makeMenuBar();         
    }
    
    public static UOMMainFrame instance ()
    {
    	if (instance == null)
    		instance = new UOMMainFrame();
    	return instance;
    }

    public void setToMaxSize()
    {
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        final Dimension dimension = toolkit.getScreenSize();
        setBounds(0,0,dimension.width - 20,dimension.height - 100);
    }
    
     private void makeMenuBar()
    { 
        final UOMMenuBar menuBar = new UOMMenuBar();
        this.setJMenuBar(menuBar);
    }
}
